<m-api-data-table [dataSource]="dataSource" [selection]="selection" [defaultOption]="{ in_task: 1 }" #table>
  <ng-container mDataTableColumn header="软件别名">
    <ng-template let-icon="icon" let-id="id" let-name="name">
      <td>
        <a [mDetailRouterLink]="{ id: id, name: name, type: 'software' }">
          <img class="g-icon-size" [src]="icon" /> {{ name }}
        </a>
      </td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="软件备注">
    <ng-template let-remark="remark">
      <td>{{ remark }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="区域数量">
    <ng-template let-area_count="area_count">
      <td>{{ area_count }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="编辑人">
    <ng-template let-admin="update_admin_username">
      <td>{{ admin }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="源内版本">
    <ng-template let-version="version">
      <td>{{ version }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="软件更新时间">
    <ng-template let-updated_at="updated_at">
      <td>{{ updated_at | date }}</td>
    </ng-template>
  </ng-container>
  <button class="btn btn-sm btn-secondary" (click)="table.selectAll(true)">全选</button>
</m-api-data-table>